package utils.parser;

import java.util.ArrayList;
import java.util.Arrays;

import algebra.query.OrderingDescription;
import algebra.query.od.OrderDep;
import utils.exception.OrderingDescriptionException;
import utils.exception.SyntaxParsingException;

//import utils.io.QueryAccess;

public class TestParser {

	/**
	 * @param args
	 * @throws SyntaxParsingException
	 */
	public static void main(String[] args) throws SyntaxParsingException {
		// String qfile = "qtest.txt";
		// for(Object[] o:QueryAccess.getQueries(qfile, null)){
		// System.out.println(o[0].toString()
		// +": "+o[1].toString()
		// +"; "+o[2].toString());
		// }
		String s = "(od-part (and A B) (od-un) (od-subs (od-id)))";
		OrderDep od = Creator.getOdFromString(s);
		System.err.println(od);
		String[] fs = { "g", "a", "h" };
		OrderDep od2 = null;
		try {
			od2 = OrderDep.getOdFeatureFromArray(new ArrayList<String>(Arrays
					.asList(fs)));
		} catch (OrderingDescriptionException e) {
			e.printStackTrace();
		}
		System.out.println(od2);
	}

}
